/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.wdm.utils;

import com.google.gson.*;
import java.lang.reflect.Type;
import org.wdm.beans.points.BusStopPoint;
import org.wdm.beans.points.Point;

/**
 *
 * @author thanasis
 */
public class BusStopPointSerializer implements JsonSerializer<BusStopPoint>
{
  @Override
  public JsonElement serialize(BusStopPoint src, Type typeOfSrc, JsonSerializationContext context)
  {
//    Gson gson = new Gson();
    JsonObject obj = new JsonObject();
        obj.addProperty("name", src.getName());
        obj.addProperty("busStopPointId", src.getPointId());
        obj.addProperty("naptanAtco", src.getNaptanAtco());
        obj.addProperty("busRoute", src.getBusRoute());
        obj.addProperty("latitude", src.getLatitude());
        obj.addProperty("longitude", src.getLongitude());
        obj.addProperty("pointType", "BusStop");
    return obj;
  }
  
  
}
